package com.colin.paymentservice12001.feign;

import com.colin.common.bean.Order;
import com.colin.common.response.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

@FeignClient("order-service")
public interface OrderFeign {

    @GetMapping("/order/{orderNum}")
    R<Order> getOrder(@PathVariable("orderNum") String orderNum);

    @PutMapping("/order/{orderNum}/{orderStatus}")
    R<Boolean> changeOrderStatus(
            @PathVariable("orderNum") String orderNum,
            @PathVariable("orderStatus") Integer orderStatus
    );
}
